package org.xworker.web;

import org.xmeta.ActionContext;
import org.xmeta.Thing;
import org.xmeta.World;
import xworker.lang.executor.Executor;

import java.io.File;

public class Deploy {
    private static final String TAG = Deploy.class.getName();

    public static void main(String[] args){
        try{
            World world = World.getInstance();
            world.init("./WEB/xworker/");

            world.addFileThingManager("HelloWeb", new File("./WEB/src/main/resources"), false, true);

            Thing deploy = world.getThing("org.xworker.Deploy");
            deploy.getAction().run(new ActionContext());
        }catch(Exception e){
            Executor.warn(TAG, "Web deploy exception", e);
        }
        System.exit(0);
    }
}
